/**
 * Handle record selected.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"0830B132-F7DF-47E3-BADE-317536F33A82"}
 */
function onRecordSelection(event) 
{ 
	
	if (tipo == scopes.globals.zconf_tipo_prod_centro_costo)  // 5
		elements.centro_costos.enabled = true;
	else
		elements.centro_costos.enabled = false;
	
	
}

/**
 * Callback method for when form is shown.
 *
 * @param {Boolean} firstShow form is shown first time after load
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"42364649-0D90-4296-B577-54FEB976B015"}
 */
function onShow(firstShow, event) 
{
	databaseManager.setAutoSave(false);
}

/**
 * Handle changed data.
 *
 * @param {Object} oldValue old value
 * @param {Object} newValue new value
 * @param {JSEvent} event the event that triggered the action
 *
 * @returns {Boolean}
 *
 * @properties={typeid:24,uuid:"9B07F23C-366E-4D9E-BE3D-4258CE57BBE6"}
 */
function onDataChange_unidad(oldValue, newValue, event) 
{
	if(unidad == null && unidad == 0)
	{
		globals.gMensaje ='Debe informar unidad '
		globals.DIALOGS.showInfoDialog('Productos',  globals.gMensaje,  "OK") // 23/01/2014
	}
	return true
}

/**
 * Handle changed data.
 *
 * @param {Object} oldValue old value
 * @param {Object} newValue new value
 * @param {JSEvent} event the event that triggered the action
 *
 * @returns {Boolean}
 *
 * @properties={typeid:24,uuid:"C016E0A8-E768-4085-B246-2320DB64B2D5"}
 */
function onDataChange_cod_producto(oldValue, newValue, event) 
{
	if (globals.gEstadoAbm != 1)
		return false;
	else
		return true;
		
}
